﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MantenimientoAtletaEquipo.aspx.cs" Inherits="UIWeb.MantenimientoAtletaEquipo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="Scripts/mootools-1.2.5-core-nc.js" type="text/javascript"></script>
    <script src="Scripts/AltaAtletaEquipo.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3>
        &nbsp;Mantenimiento de Participantes</h3>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <div id="ovUp" runat="server" class="over">
                Cargando...
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanelAltaAtletaEquipo" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div class="form" style="float: left;" id="miForm" runat="server">
                <div>
                    <div>
                        Nombre:
                    </div>
                    <div class="formInput">
                        <asp:TextBox ID="txtNombre" runat="server" Style="float: left;"></asp:TextBox>
                    </div>
                    <div style="float: right;">
                        <asp:RequiredFieldValidator ID="RFNombre" runat="server" ErrorMessage="Campo Requerido"
                            ValidationGroup="All" ControlToValidate="txtNombre" ForeColor="Red">*</asp:RequiredFieldValidator>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="formSpacing">
                    <div>
                        País:
                    </div>
                    <div class="formInput">
                        <asp:DropDownList ID="DropDownListPaises" runat="server" Style="float: left; width: 308px;">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="formSpacing">
                    <div>
                        Tipo:
                    </div>
                    <div>
                        <asp:RadioButtonList CssClass="CheckBox" ID="RadioButtonParticipante" runat="server">
                            <asp:ListItem Selected="True">Atleta</asp:ListItem>
                            <asp:ListItem>Equipo </asp:ListItem>
                        </asp:RadioButtonList>
                    </div>
                </div>
                <div class="formSpacing">
                    <div>
                        Deportes:
                        <div>
                            <asp:CheckBoxList ID="CheckBoxListDeportes" CssClass="CheckBox" runat="server" DataTextField="Nombre"
                                Style="border: none;" DataValueField="Id" RepeatColumns="4" BorderStyle="Solid"
                                BorderColor="#b6b7bc" BorderWidth="1px" RepeatDirection="Vertical">
                            </asp:CheckBoxList>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="formSpacing">
                        <div>
                            <div>
                                Foto:
                            </div>
                            <div class="resize2" style="margin-left: 10px;">
                                <asp:Image ID="ImageParticipante" runat="server" BorderStyle="Solid" BorderColor="#b6b7bc"
                                    BorderWidth="3px" ImageUrl="~/Images/usuariosinfoto.gif" />
                            </div>
                        </div>
                    </div>
                    <div class="formSpacing">
                        <div style="float: left;">
                            <asp:FileUpload ID="FileUploadFoto" runat="server" />
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <br />
                    <div>
                        <asp:LinkButton ID="lnkAlta" runat="server" CssClass="lnkbtn" OnClick="lnkAlta_Click"
                            ValidationGroup="All">Alta</asp:LinkButton>
                        <asp:LinkButton ID="lnkModificar" runat="server" CssClass="lnkbtn" OnClick="lnkModificar_Click"
                            ValidationGroup="All">Modificar</asp:LinkButton>
                        <asp:LinkButton ID="lnkEliminar" runat="server" CssClass="lnkbtn" OnClick="lnkEliminar_Click"
                            ValidationGroup="All">Eliminar</asp:LinkButton>
                    </div>
                    <br />
                    <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" ValidationGroup="All" />
                </div>
            </div>
            <div style="float: right; width: 520px;" id="rigthDivForm" runat="server">
                <asp:GridView ID="GridViewAtletasEquipos" runat="server" AutoGenerateColumns="False"
                    CellPadding="4" ForeColor="#333333" GridLines="None" Width="493px" AllowPaging="True"
                    OnPageIndexChanging="GridViewAtletasEquipos_PageIndexChanging" DataKeyNames="Id"
                    OnPageIndexChanged="GridViewAtletasEquipos_PageIndexChanged" OnSelectedIndexChanged="GridViewAtletasEquipos_SelectedIndexChanged" PageSize="100">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" />
                        <asp:BoundField DataField="Id" HeaderText="Id" FooterStyle-HorizontalAlign="Left"
                            Visible="false" SortExpression="Id">
                            <FooterStyle HorizontalAlign="Left"></FooterStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="Nombre" HeaderText="Nombre" SortExpression="Nombre" />
                        <asp:BoundField DataField="PaisNombre" HeaderText="Pais" SortExpression="PaisNombre" />
                        <asp:BoundField DataField="TipoParticipante" HeaderText="Tipo" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl=<%# String.Format("javascript:void(showPopUp('{0}'))", Eval("id")) %>>Agregar</asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                <div id="popUpComentarios" style="width: 370px; position: absolute; z-index: 10;
                    background: #FFF; display: none; border: solid 1px #848484;">
                    <asp:HiddenField ID="HiddenIdParticipante" runat="server" />
                    <div style="height: 20px; background: #EBEBEB;">
                        <a style="text-decoration: none; border: none;" href="javascript:void(0)" onclick="closePopUp();">
                            <img src="Images/cross.jpg" style="float: right; padding: 4px;" />
                        </a>
                    </div>
                    <div style="padding: 15px;">
                        <div>
                            Comentario:
                        </div>
                        <div>
                            <div Style="float: left;">
                                <asp:TextBox ID="TextComentario" runat="server" Height="57px"
                                    TextMode="MultiLine" Width="237px"></asp:TextBox>
                            </div>
                            <div Style="float: left;padding-top:20px;padding-left:5px;">
                                <asp:LinkButton ID="LinkButton1" runat="server" CssClass="lnkbtn" 
                                    onclick="LinkButton1_Click">Agregar</asp:LinkButton>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div id="contentComentList">
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
        <%--<Triggers>
            <asp:PostBackTrigger ControlID="lnkAlta" />
            <asp:PostBackTrigger ControlID="lnkModificar" />
        </Triggers> --%>
    </asp:UpdatePanel>
</asp:Content>
